<!DOCTYPE html>
<html lang="en">

<head>
	<link rel="icon" href="{{url_for('static', filename='assets/images/AD_favicon.png')}}" type="image/png">
	<title>AD智能诊断系统</title>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<link rel="stylesheet" href="../../static/css/bootstrap.min.css" />
	<link rel="stylesheet" href="../../static/css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="../../static/bootstrap-fileinput/css/fileinput.min.css">

	<!--<link rel="stylesheet" href="../../static/css/bootstrap.min.css" />-->
	<link rel="stylesheet" href="../../static/css/bootstrap-responsive.min.css" />
	<link rel="stylesheet" href="../../static/css/fullcalendar.css" />
	<link rel="stylesheet" href="../../static/css/matrix-style.css" />
	<link rel="stylesheet" href="../../static/css/matrix-media.css" />
	<link rel="stylesheet" href="../../static/font-awesome/css/font-awesome.css" />
	<link rel="stylesheet" href="../../static/css/jquery.gritter.css" />
	<link rel='stylesheet' href='../../static/css/font.css' />
	<!-- <link rel="stylesheet" type="text/css" href="practice_system/bootstrap-3.3.7/css/bootstrap.min.css"> -->
</head>

	<body>

		<!--Header-part-->

		<div id="header">
			<h3 style="margin:15px auto auto 10px;">AD智能诊断系统</h3>
			<!-- <h1><a href="#">实习管理系统</a></h1> -->
		</div>
		</div>
		<!--close-Helabeler-part-->

		<!--top-Header-menu-->
		<div id="user-nav" class="navbar navbar-inverse" style="background: #2C3B48;">

			<ul class="nav">
				<li class="dropdown" id="profile-messages">
					<a title="" href="#" data-toggle="dropdown" data-target="#profile-messages" class="dropdown-toggle"><i class="icon icon-user"></i> <span class="text">用户配置</span><b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li>
							<a href="/AdminInfo"><i class="icon-user"></i> 个人信息</a>
						</li>
						<li class="divider"></li>
						<li>
							<a href="/AdminLogout"><i class="icon-key"></i> 登出</a>
						</li>
					</ul>
				</li>
				<!-- <li class="dropdown" id="menu-messages"><a href="#" data-toggle="dropdown" data-target="#menu-messages" class="dropdown-toggle"><i class="icon icon-envelope"></i> <span class="text">消息</span> <span class="label label-important">5</span> <b class="caret"></b></a>
      <ul class="dropdown-menu">
        <li><a class="sAdd" title="" href="#"><i class="icon-plus"></i> 新消息</a></li>
        <li class="divider"></li>
        <li><a class="sOutbox" title="" href="#"><i class="icon-arrow-up"></i> outbox</a></li>
        <li class="divider"></li>
        <li><a class="sTrash" title="" href="#"><i class="icon-trash"></i> trash</a></li>
      </ul>
    </li> -->
				<li class="">
					<a title="" href="/AdminSetting"><i class="icon icon-cog"></i> <span class="text">设置</span></a>
				</li>
				<li class="">
					<a title="" href="/AdminLogout"><i class="icon icon-share-alt"></i> <span class="text">登出</span></a>
				</li>
				<li class="">
					<a title="" href="/AdminIndex"><i class="icon icon-user"></i> <span class="text">管理员：</span><span id="userid">{{ username }}</span></a>
				</li>
			</ul>
		</div>

		<!--左边侧边栏-->
		<div id="sidebar">
			<a href="/AdminIndex" class="visible-phone"><i class="icon icon-home"></i> 申请列表</a>
			<ul>
				<li>
					<a href="/AdminIndex"><i class="icon icon-home"></i> <span> 主页 </span></a>
				</li>
				<li class="submenu">
					<a href="/AdminDApply"><i class="icon icon-time"></i> <span>申请列表</span>
						<ul>
							<li>
								<a href="/AdminDApply">诊断申请列表</a>
							</li>
							<li>
								<a href="/AdminJApply">入职申请列表</a>
							</li>
						</ul>
						<!-- </a> -->
				</li>
				<li class="submenu active">
					<a href="/AdminUserManage"><i class="icon icon-th-list"></i> <span>用户管理</span>
						<ul>
							<li>
								<a href="/AdminUserManage">普通用户管理</a>
							</li>
							<li>
								<a href="/AdminExpertManage">专家用户管理</a>
							</li>
							<li>
								<a href="/AdminExpertPush">专家用户导入</a>
							</li>
						</ul>
				</li>
				<li>
					<a href="/AdminInfo"><i class="icon icon-user"></i> <span>个人信息</span></a>
				</li>
				<li>
					<a href="/AdminContact"><i class="icon icon-phone"></i> <span>联系我们</span></a>
				</li>
			</ul>
		</div>
		<!--sidebar-menu-->

		<div id="content">
			<div id="content-header">
				<div id="breadcrumb">
					<a href="/AdminIndex" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 主页</a>
				</div>
			</div>

			<div class="container-fluid">
				<!--在这里面写主要内容-->
				<div class="widget-box">
					<div class="widget-title"> <span class="icon"> <i class="icon-th"></i> </span>
						<h5>专家信息导入</h5>
						<span class="label label-info" id="user_id"></span> </div>
					<div class="widget-content ">
						<div class="widget-content nopadding">
							<form id="uploadForm" action="#" method="post" enctype="multipart/form-data" class="form-horizontal">
								<!--<div class="control-group">
              <div class="controls" style="background-color: rgba(255,255,255,0.2);">
                <input type="file" name="excelfilename" id="f"/> 
                  <button  id="push" type="button" class="btn btn-success">导入</button>
                  <button type="reset" class="btn btn-success">清除</button>
              </div>    
           </div>-->
								<div class="control-group">
									<label class="control-label">读取专家用户Excel表</label>
									<div class="controls" style="width: 220px;">
										<div class="panel-body">
											<input id="file_upload" type="file" class="file" data-preview-file-type="image" multiple>
										</div>
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">导入状态</label>
									<div class="controls" style="width: 220px; ">
										<label id="Status" class="Status" name="Status" style="color: red;" />
									</div>
								</div>

							</form>

							<hr>
							<h5>说明：导入文件为excel(格式为xlsx或xls)，将文件放入该项目根目录即可。每行为一个专家用户，每列分别是：专家ID，密码，姓名，性别，出生日期，联系电话</h5>

						</div>

					</div>
				</div>

			</div>

		</div>

		<!--底部说明-->
		<div class="row-fluid">
			<div id="footer" class="span12">
				2019 &copy; HuaCode
			</div>
		</div>


		<script src="../../static/js/excanvas.min.js"></script>
		<script src="../../static/js/jquery.min.js"></script>
		<script src="../../static/js/jquery.ui.custom.js"></script>
		<script src="../../static/js/bootstrap.min.js"></script>
		<script src="../../static/js/jquery.flot.min.js"></script>
		<script src="../../static/js/jquery.flot.resize.min.js"></script>
		<script src="../../static/js/jquery.peity.min.js"></script>
		<script src="../../static/js/fullcalendar.min.js"></script>
		<script src="../../static/js/matrix.js"></script>
		<script src="../../static/js/matrix.dashboard.js"></script>
		<script src="../../static/js/jquery.gritter.min.js"></script>
		<script src="../../static/js/matrix.interface.js"></script>
		<script src="../../static/js/matrix.chat.js"></script>
		<script src="../../static/js/jquery.validate.js"></script>
		<script src="../../static/js/matrix.form_validation.js"></script>
		<script src="../../static/js/jquery.wizard.js"></script>
		<script src="../../static/js/jquery.uniform.js"></script>
		<script src="../../static/js/select2.min.js"></script>
		<script src="../../static/js/matrix.popover.js"></script>
		<script src="../../static/js/jquery.dataTables.min.js"></script>
		<script src="../../static/js/matrix.tables.js"></script>

		<script src="../../static/js/jquery.js"></script>
		<script src="../../static/js/bootstrap.min.js"></script>
		<script src="../../static/bootstrap-fileinput/js/fileinput.min.js"></script>
		<script src="../../static/bootstrap-fileinput/js/locales/zh.js"></script>

		<script>
			initFileInput("file_upload");

			function initFileInput(ctrlName) {
				var control = $('#' + ctrlName);
				control.fileinput({
					language: 'zh', //设置语言
					uploadUrl: "/ExpertPush", //上传的地址
					allowedFileExtensions: ['xlsx', 'xls'], //接收的文件后缀
					//uploadExtraData:{"id": 1, "fileName":'123.mp3'},
					uploadAsync: true, //默认异步上传
					showUpload: true, //是否显示上传按钮
					showRemove: true, //显示移除按钮
					showPreview: false, //是否显示预览
					showCaption: false, //是否显示标题
					browseClass: "btn btn-primary", //按钮样式
					// dropZoneEnabled: true,//是否显示拖拽区域
					//minImageWidth: 50, //图片的最小宽度
					//minImageHeight: 50,//图片的最小高度
					//maxImageWidth: 1000,//图片的最大宽度
					//maxImageHeight: 1000,//图片的最大高度
					//maxFileSize: 0,//单位为kb，如果为0表示不限制文件大小
					//minFileCount: 0,
					// maxFileCount: 10, //表示允许同时上传的最大文件个数
					enctype: 'multipart/form-data',
					validateInitialCount: true,
					previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
					msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}！",

				}).on('filepreupload', function(event, data, previewId, index) { //上传中
					var form = data.form,
						files = data.files,
						extra = data.extra,
						response = data.response,
						reader = data.reader;
					console.log('文件正在上传');
				}).on("fileuploaded", function(event, data, previewId, index) { //一个文件上传成功
					console.log('文件上传成功！');
					// console.log(data)
					// data=JSON.parse(data)
					msg = data.response['msg'];
					//      msg = data.response['msg']
					$("#Status").html(msg);
					//      user_name = {{ username }};
					//      alert(user_name);
					//      $("#user_id").html(user_name);

				}).on('fileerror', function(event, data, msg) { //一个文件上传失败
					console.log('文件上传失败！');
				})
			}
		</script>
	</body>

</html>